import React from 'react' // 引入react
import { Route,IndexRoute  } from 'react-router';
import Header from '../header/container/header'
import HomeContainer from '../home/container/index'
import AboutContainer from '../about/container/index'


class IndexComponent extends React.Component {
    render() {
        return <div>
            <Header />
            <div>
                {this.props.children}
            </div>
        </div>
    }
}

export default (
    <Route path="/" component={IndexComponent}>
        <IndexRoute component={HomeContainer}/>
        <Route path="/home" component={HomeContainer}/>
        <Route path="/about" component={AboutContainer}/>
    </Route>
)

